<template>
  <div class="root">
    <template v-if="showStyle">
      <goods v-for="good in goods" :key="good" :goods="good"></goods>
    </template>
    <template v-else>
      <block-goods
        v-for="good in goods"
        :key="good"
        :goods="good"
      ></block-goods>
    </template>
  </div>
</template>

<script>
import goods from "@/components/goods/goods";
import blockGoods from "@/components/goods/blockGoods";

export default {
  components: {
    goods,
    blockGoods
  },
  data() {
    return {};
  },
  props: {
    showStyle: {
      type: Boolean,
      defalut: true
    },
    goods: {
      type: Array,
      defalut: []
    }
  }
};
</script>
<style scoped lang="less">
.root {
  width: 100%;
  overflow: hidden;
}
</style>